-
Notifications
You must be signed in to change notification settings - Fork 478
Fixes php 8.4 deprecation warnings like: "Implicitly marking paramete… #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes php 8.4 deprecation warnings like: "Implicitly marking paramete… #607
Conversation
…r ... as nullable is deprecated, the explicit nullable type must be used instead in ..." Example Warning: PHP Deprecated: Kalnoy\Nestedset\NodeTrait::create(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/kalnoy/nestedset/src/NodeTrait.php on line 754 And fixes "Class "Laravel\SerializableClosure\Support\ReflectionClosure" not found" when running the tests.
@lazychaser Can this be merged? |
@lazychaser can you take a look? |
@lazychaser can you merge this? |
@lazychaser can you take a look please? |
If you could have a look it would be nice. The changelog isn’t that big as I see it. |
@julesgraus you might want to rebase the branch because the L12 compatibility was merged. Maybe then @jonnott would have a second to look at it. |
Done |
Fix quote problem due to incorrect rebase / merge
…em as tests files because of the suffix defined in the phpunit config.
@julesgraus Do you think putting this out as v6.1.0 would be a good plan? |
@jonnott I just looked at the PR you merged, and because there are also signature changes involved (some methods are now typed that weren't before), technically, 7.0.0 release would actually be correct. For example this change: Means, that if in case somebody passed a table name as int instead of string, they'd now get a TypeError (a little far fetched, but still valid). And that's why it's required to be marked as Major release, which expresses that there are breaking changes in the API (method signatures). Another way is to specifically revert the changes where no type was declared before, and keep the other fixes fixing the deprecations. This would allow 6.1.0 release. |
@julesgraus Thoughts on what @kohlerdominik says? |
I am not using or near a computer at the moment. Technically what @kohlerdominik says is true and valid. But the docblocks above the methods already said that you need to pass in strings or null. So yeah, the signature has changed and it now throws type errors, but you have been warned before by the docblock if you used it in a wrong way. And most importantly: it probable did not work anyway if you used the methods wrong. Regardless if this technically is a breaking change, the user had his app in a broken state already if he did use the methods wrong. So @kohlerdominik is right. But even though, without looking into it any further, I do not think it’s a problem for the users of the package. what about versioning? If we could agree for now that it isn’t a major change, it would be a patch release I guess (the last number in the version needs to increment). Because it’s not a feature (middle number of the version. If you guys decide that it must be a major release anyways, let me know. I can apply the changes on a version 7 branch for example. Just let me know. |
I think it could be a minor release then - i.e. 6.1.0. It's not a breaking change technically as you say, as if you weren't adhering to the correct types on these methods, your app would be broken anyway. |
Yes, I agree 👍 |
Ok. I have the privileges to tag a new version, but I'm worried about breaking peoples' apps by getting anything wrong which introduces a BC break. Thoughts appreciated.. |
@jonnott when merging #619 you'd get these changes between Allowing the next release to be |
Fixes php 8.4 deprecation warnings like: "Implicitly marking parameter ... as nullable is deprecated, the explicit nullable type must be used instead in ..."
Example Warning: PHP Deprecated: Kalnoy\Nestedset\NodeTrait::create(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/kalnoy/nestedset/src/NodeTrait.php on line 754
And fixes "Class "Laravel\SerializableClosure\Support\ReflectionClosure" not found" when running the tests.
I've discovered more issues with php docblocks that can be fixed in different ways, but i wanted to keep this pull request as small as possible.